ECHO OFF 
CLS 
color 0a



GOTO MENU 
:MENU 
ECHO. 
ECHO. Setup command
ECHO. 
ECHO. 1. virtualenv venv           2. pip.exe install -r requirements.txt
ECHO. 
ECHO. 3. pyinstaller buid.spec     4. run python main.py
ECHO. 
ECHO. 0. exit
ECHO. 
rem echo. 请输入选择的序号：
set /p id=Please select the index:
cls

if "%id%"=="1" goto mk_venv
 
if "%id%"=="2" goto pip_install
 
if "%id%"=="3" goto build2exe  

if "%id%"=="4" goto run 
    n

IF "%id%"=="0" exit ELSE (
echo the select %id% cannot be meet,please re-input:
pause
GOTO MENU 
)

:mk_venv
echo Execute virtualenv venv
virtualenv venv
GOTO MENU

:pip_install
echo Execute pip.exe install -r requirements.txt
venv\Scripts\pip.exe install -r requirements.txt
GOTO MENU

:build2exe 
echo pyinstaller buid.spec
venv\Scripts\pyinstaller buid.spec
GOTO MENU

:run 
echo run  python main.py
venv\Scripts\python main.py
GOTO MENU


:PUASE
pause
echo.
echo Exited